//package com.luli.controllor.ai;
//
//import com.luli.entity.response.ResponseMsg;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.ai.chat.model.ChatModel;
//import org.springframework.ai.chat.prompt.Prompt;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.web.bind.annotation.*;
//
//import java.io.IOException;
//
//import static com.luli.Utils.ResponseMsgUtil.getSuccessMsg;
//
///**
// * 陆离
// * 2025-5-4
// */
//@RestController
//@Slf4j
//@RequestMapping("/ai")
//@CrossOrigin
//public class AiController {
//
//    private final ChatModel chatModel;
//
//    public AiController(@Qualifier("dashScopeChatmodel") ChatModel chatModel) {
//        this.chatModel = chatModel;
//    }
//
//    @GetMapping("/simple/chat")
//    public ResponseMsg<?> simpleChat(String message) throws IOException {
//        String data = chatModel.call(new Prompt(message)).getResult().getOutput().getText();
//        return getSuccessMsg("200", "查询成功", data);
//    }
//}
